package system

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type SysStoresRouter struct {}

// InitSysStoresRouter 初始化 门店信息 路由信息
func (s *SysStoresRouter) InitSysStoresRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	sysStoresRouter := Router.Group("sysStores").Use(middleware.OperationRecord())
	sysStoresRouterWithoutRecord := Router.Group("sysStores")
	sysStoresRouterWithoutAuth := PublicRouter.Group("sysStores")
	{
		sysStoresRouter.POST("createSysStores", sysStoresApi.CreateSysStores)   // 新建门店信息
		sysStoresRouter.DELETE("deleteSysStores", sysStoresApi.DeleteSysStores) // 删除门店信息
		sysStoresRouter.DELETE("deleteSysStoresByIds", sysStoresApi.DeleteSysStoresByIds) // 批量删除门店信息
		sysStoresRouter.PUT("updateSysStores", sysStoresApi.UpdateSysStores)    // 更新门店信息
	}
	{
		sysStoresRouterWithoutRecord.GET("findSysStores", sysStoresApi.FindSysStores)        // 根据ID获取门店信息
		sysStoresRouterWithoutRecord.GET("getSysStoresList", sysStoresApi.GetSysStoresList)  // 获取门店信息列表
	}
	{
	    sysStoresRouterWithoutAuth.GET("getSysStoresPublic", sysStoresApi.GetSysStoresPublic)  // 门店信息开放接口
	}
}
